package com.ifox.hgx.spring.bean;

public class Car {

    private Integer id ;
    private String name ;

    public void init(){
        System.out.println("init ...");
    }

    public void destroy(){
        System.out.println("destroy ....");
    }

    public Car() {
        System.out.println("Car's Constructor  ...");
    }

    public Car(Integer id, String name) {
        this.id = id;
        this.name = name;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        System.out.println("设置id");
        this.id = id;
    }



    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public String toString() {
        return "Car{" +
                "id=" + id +
                ", name='" + name + '\'' +
                '}';
    }
}
